package com.zfl.controller;

import com.zfl.dto.query.SeatQuery;
import com.zfl.entity.Seat;
import com.zfl.service.SeatService;
import com.zfl.vo.Result;
import com.zfl.vo.result.PageResult;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/admin/seat")
@RequiredArgsConstructor
public class AdminSeatController {
    private final SeatService seatService;

    // 管理员查询所有座位（带分页和条件）
    @GetMapping("/list")
    public Result<PageResult<Seat>> listAllSeats(SeatQuery query) {
        return Result.success("管理员查询所有座位成功", seatService.listAllSeats(query));
    }
}